Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static typing with Python type annotations #35

Merged
merged 6 commits into from
Sep 7, 2024
Merged

Conversation

GNiendorf
Copy link
Owner

@GNiendorf GNiendorf commented Sep 4, 2024

This PR adds static typing for almost all functions in tracepy. A few functions, like glass_index, need fixing before static typing is added. I also moved many of the constants used in the code to a new constants.py file, and added a new exception "InvalidGeometry" for invalid geometry inputs given by a user. The gen_rot function was moved to utils.py to remove a circular import. Lastly, I broke up the transform.py functions to allow for static typing, since having two different return types was causing an issue.

@GNiendorf GNiendorf marked this pull request as ready for review September 7, 2024 22:29
@GNiendorf GNiendorf merged commit 35e97dd into master Sep 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant